3.252 \(\int \frac {A+B \log (e (a+b x)^n (c+d x)^{-n})}{(f+g x) (a h+b h x)} \, dx\)

Optimal. Leaf size=123 \[ \frac {B n \text {Li}_2\left (\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{h (b f-a g)}-\frac {\log \left (1-\frac {(c+d x) (b f-a g)}{(a+b x) (d f-c g)}\right ) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h (b f-a g)} \]

[Out]

-(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))*ln(1-(-a*g+b*f)*(d*x+c)/(-c*g+d*f)/(b*x+a))/(-a*g+b*f)/h+B*n*polylog(2,(-a*
g+b*f)*(d*x+c)/(-c*g+d*f)/(b*x+a))/(-a*g+b*f)/h

________________________________________________________________________________________

Rubi [A]  time = 0.37, antiderivative size = 163, normalized size of antiderivative = 1.33, number of steps used = 8, number of rules used = 6, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {6742, 36, 31, 2503, 2502, 2315} \[ \frac {B n \text {PolyLog}\left (2,\frac {(f+g x) (b c-a d)}{(a+b x) (d f-c g)}+1\right )}{h (b f-a g)}+\frac {A \log (a+b x)}{h (b f-a g)}-\frac {A \log (f+g x)}{h (b f-a g)}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(f+g x) (b c-a d)}{(a+b x) (d f-c g)}\right )}{h (b f-a g)} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/((f + g*x)*(a*h + b*h*x)),x]

[Out]

(A*Log[a + b*x])/((b*f - a*g)*h) - (A*Log[f + g*x])/((b*f - a*g)*h) - (B*Log[(e*(a + b*x)^n)/(c + d*x)^n]*Log[
-(((b*c - a*d)*(f + g*x))/((d*f - c*g)*(a + b*x)))])/((b*f - a*g)*h) + (B*n*PolyLog[2, 1 + ((b*c - a*d)*(f + g
*x))/((d*f - c*g)*(a + b*x))])/((b*f - a*g)*h)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2502

Int[Log[((e_.)*((c_.) + (d_.)*(x_)))/((a_.) + (b_.)*(x_))]*(u_), x_Symbol] :> With[{g = Coeff[Simplify[1/(u*(a
 + b*x))], x, 0], h = Coeff[Simplify[1/(u*(a + b*x))], x, 1]}, -Dist[(b - d*e)/(h*(b*c - a*d)), Subst[Int[Log[
e*x]/(1 - e*x), x], x, (c + d*x)/(a + b*x)], x] /; EqQ[g*(b - d*e) - h*(a - c*e), 0]] /; FreeQ[{a, b, c, d, e}
, x] && NeQ[b*c - a*d, 0] && LinearQ[Simplify[1/(u*(a + b*x))], x]

Rule 2503

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*(u_), x_Symbol] :> Wi
th[{g = Coeff[Simplify[1/(u*(a + b*x))], x, 0], h = Coeff[Simplify[1/(u*(a + b*x))], x, 1]}, -Simp[(Log[e*(f*(
a + b*x)^p*(c + d*x)^q)^r]^s*Log[-(((b*c - a*d)*(g + h*x))/((d*g - c*h)*(a + b*x)))])/(b*g - a*h), x] + Dist[(
p*r*s*(b*c - a*d))/(b*g - a*h), Int[(Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1)*Log[-(((b*c - a*d)*(g + h*x)
)/((d*g - c*h)*(a + b*x)))])/((a + b*x)*(c + d*x)), x], x] /; NeQ[b*g - a*h, 0] && NeQ[d*g - c*h, 0]] /; FreeQ
[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && IGtQ[s, 0] && EqQ[p + q, 0] && LinearQ[Simplify[1/
(u*(a + b*x))], x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx &=\int \left (\frac {A}{h (a+b x) (f+g x)}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h (a+b x) (f+g x)}\right ) \, dx\\ &=\frac {A \int \frac {1}{(a+b x) (f+g x)} \, dx}{h}+\frac {B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (f+g x)} \, dx}{h}\\ &=-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {(A b) \int \frac {1}{a+b x} \, dx}{(b f-a g) h}-\frac {(A g) \int \frac {1}{f+g x} \, dx}{(b f-a g) h}+\frac {(B (b c-a d) n) \int \frac {\log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{(b f-a g) h}\\ &=\frac {A \log (a+b x)}{(b f-a g) h}-\frac {A \log (f+g x)}{(b f-a g) h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}-\frac {(B (b c-a d) n) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d f-c g}\right )}{1+\frac {(b c-a d) x}{d f-c g}} \, dx,x,\frac {f+g x}{a+b x}\right )}{(b f-a g) (d f-c g) h}\\ &=\frac {A \log (a+b x)}{(b f-a g) h}-\frac {A \log (f+g x)}{(b f-a g) h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {B n \text {Li}_2\left (1+\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.31, size = 304, normalized size = 2.47 \[ -\frac {-2 A \log (a+b x)+2 B \log (f+g x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )-2 B \log (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )+2 B n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )-2 B n \log (a+b x) \log (c+d x)+2 B n \log (c+d x) \log \left (\frac {d (a+b x)}{a d-b c}\right )+2 B n \text {Li}_2\left (\frac {g (a+b x)}{a g-b f}\right )-2 B n \log (a+b x) \log (f+g x)+2 B n \log (a+b x) \log \left (\frac {b (f+g x)}{b f-a g}\right )+B n \log ^2(a+b x)+2 A \log (f+g x)-2 B n \text {Li}_2\left (\frac {g (c+d x)}{c g-d f}\right )+2 B n \log (c+d x) \log (f+g x)-2 B n \log (c+d x) \log \left (\frac {d (f+g x)}{d f-c g}\right )}{2 h (b f-a g)} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/((f + g*x)*(a*h + b*h*x)),x]

[Out]

-1/2*(-2*A*Log[a + b*x] + B*n*Log[a + b*x]^2 - 2*B*n*Log[a + b*x]*Log[c + d*x] + 2*B*n*Log[(d*(a + b*x))/(-(b*
c) + a*d)]*Log[c + d*x] - 2*B*Log[a + b*x]*Log[(e*(a + b*x)^n)/(c + d*x)^n] + 2*A*Log[f + g*x] - 2*B*n*Log[a +
 b*x]*Log[f + g*x] + 2*B*n*Log[c + d*x]*Log[f + g*x] + 2*B*Log[(e*(a + b*x)^n)/(c + d*x)^n]*Log[f + g*x] + 2*B
*n*Log[a + b*x]*Log[(b*(f + g*x))/(b*f - a*g)] - 2*B*n*Log[c + d*x]*Log[(d*(f + g*x))/(d*f - c*g)] + 2*B*n*Pol
yLog[2, (g*(a + b*x))/(-(b*f) + a*g)] + 2*B*n*PolyLog[2, (b*(c + d*x))/(b*c - a*d)] - 2*B*n*PolyLog[2, (g*(c +
 d*x))/(-(d*f) + c*g)])/((b*f - a*g)*h)

________________________________________________________________________________________

fricas [F]  time = 0.86, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{b g h x^{2} + a f h + {\left (b f + a g\right )} h x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(g*x+f)/(b*h*x+a*h),x, algorithm="fricas")

[Out]

integral((B*log((b*x + a)^n*e/(d*x + c)^n) + A)/(b*g*h*x^2 + a*f*h + (b*f + a*g)*h*x), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{{\left (b h x + a h\right )} {\left (g x + f\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(g*x+f)/(b*h*x+a*h),x, algorithm="giac")

[Out]

integrate((B*log((b*x + a)^n*e/(d*x + c)^n) + A)/((b*h*x + a*h)*(g*x + f)), x)

________________________________________________________________________________________

maple [C]  time = 0.36, size = 1447, normalized size = 11.76 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/(g*x+f)/(b*h*x+a*h),x)

[Out]

1/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csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^2-1/2*I/h/(a*
g-b*f)*ln(g*x+f)*B*Pi*csgn(I*e)*csgn(I*(b*x+a)^n/((d*x+c)^n))*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)-1/2*I/h/(a*g-b*f
)*ln(b*x+a)*B*Pi*csgn(I/((d*x+c)^n))*csgn(I*(b*x+a)^n/((d*x+c)^n))^2+1/2*I/h/(a*g-b*f)*ln(g*x+f)*B*Pi*csgn(I*(
b*x+a)^n/((d*x+c)^n))*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^2+1/2*I/h/(a*g-b*f)*ln(b*x+a)*B*Pi*csgn(I*e)*csgn(I*(b*x
+a)^n/((d*x+c)^n))*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)+1/2*I/h/(a*g-b*f)*ln(b*x+a)*B*Pi*csgn(I*(b*x+a)^n/((d*x+c)^
n))^3-1/2*I/h/(a*g-b*f)*ln(g*x+f)*B*Pi*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^3+1/h*B*ln((d*x+c)^n)/(a*g-b*f)*ln(b*x+
a)+1/h*B/(a*g-b*f)*ln(g*x+f)*ln((b*x+a)^n)+1/2*I/h/(a*g-b*f)*ln(b*x+a)*B*Pi*csgn(I*e/((d*x+c)^n)*(b*x+a)^n)^3+
1/h*B*n/(a*g-b*f)*dilog(((g*x+f)*d+c*g-d*f)/(c*g-d*f))-1/h*B*n/(a*g-b*f)*dilog((b*(g*x+f)+a*g-b*f)/(a*g-b*f))+
1/2/h*B*n/(a*g-b*f)*ln(b*x+a)^2-1/h*B*n/(a*g-b*f)*dilog((-a*d+b*c+(b*x+a)*d)/(-a*d+b*c))+1/h/(a*g-b*f)*ln(g*x+
f)*B*ln(e)-1/h/(a*g-b*f)*ln(b*x+a)*B*ln(e)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ A {\left (\frac {\log \left (b x + a\right )}{{\left (b f - a g\right )} h} - \frac {\log \left (g x + f\right )}{{\left (b f - a g\right )} h}\right )} - B \int -\frac {\log \left ({\left (b x + a\right )}^{n}\right ) - \log \left ({\left (d x + c\right )}^{n}\right ) + \log \relax (e)}{b g h x^{2} + a f h + {\left (b f h + a g h\right )} x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(g*x+f)/(b*h*x+a*h),x, algorithm="maxima")

[Out]

A*(log(b*x + a)/((b*f - a*g)*h) - log(g*x + f)/((b*f - a*g)*h)) - B*integrate(-(log((b*x + a)^n) - log((d*x +
c)^n) + log(e))/(b*g*h*x^2 + a*f*h + (b*f*h + a*g*h)*x), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{\left (f+g\,x\right )\,\left (a\,h+b\,h\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))/((f + g*x)*(a*h + b*h*x)),x)

[Out]

int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))/((f + g*x)*(a*h + b*h*x)), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))/(g*x+f)/(b*h*x+a*h),x)

[Out]

Timed out

________________________________________________________________________________________